package com.epam.Runner;

import org.apache.log4j.Logger;

import com.epam.Bank.Cashier;
import com.epam.Bank.Observer;
import com.epam.Client.Client;

public class WorkDay {

	Logger log = Logger.getLogger(WorkDay.class);
	final Object sync = new Object();

	public void init() throws Exception {

		for (int i = 1; i <= 10; i++) {
			Client c = new Client(i);
			Main.setClients(c);
			log.info("Client number " + i + " entered the bank");
		}
		new Cashier();
		new Cashier();
		new Cashier();
		new Observer();
		Thread a = new Thread(new Client());
		a.start();
	}

}
